home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / DJSRC111.ZIP / go32 / extdebug.h < prev    next >
C/C++ Source or Header  |  1993-08-15  |  2KB  |  58 lines

  1. /* This is file EXTDEBUG.H */
  2. /*
  3. ** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15. #ifndef _EXTDEBUG_H_
  16. #define _EXTDEBUG_H_
  17.  
  18. /* This file defines the interface that go32 exports to external debuggers */
  19.  
  20. typedef struct {
  21.   word16 version;    /* set to version number of interface */
  22.   word16 a_tss_ofs;    /* pointer to TSS for debugged program */
  23.   word16 a_tss_seg;
  24.   word16 filename_ofs;    /* points to name of file being debugged */
  25.   word16 filename_seg;
  26.   word16 filename_len;
  27.   word16 areas_ofs;    /* from paging.c */
  28.   word16 areas_seg;
  29.   /* 4-byte align required here */
  30.   word32 app_base;    /* linear base address of application */
  31.   word32 dr[8];        /* debug registers, set when a_tss runs */
  32.   
  33.   word32 ansi_mode;    /* if set, OK to emit ansi control codes */
  34. } ExternalDebuggerInfo;
  35.  
  36. #define EXTERNAL_DEBUGGER_VERSION    1    /* this is version 1 */
  37.  
  38. /* These codes are passed in %al when %ah == 0xfe for int 0x21 */
  39. #define EXTERNAL_DEBUGGER_EXECUTE    0    /* runs a_tss until stop */
  40. #define EXTERNAL_DEBUGGER_GETINFOPTR    1    /* returns seg:ofs of info struct in edx:eax */
  41.  
  42.  
  43. #ifndef __GO32__    /* These are internal to go32 */
  44.  
  45. extern int using_external_debugger;
  46. extern void load_external_debugger(char *filename, char *running_fname, char *argv0);
  47. extern int external_debugger_handler(void);
  48.  
  49. extern word16 external_debugger_cs;
  50. extern word16 external_debugger_ds;
  51.  
  52. void set_break_DPMI(void);
  53. void clear_break_DPMI(void);
  54.  
  55. #endif
  56.  
  57. #endif
  58.